package com.dwxt.parabolic.controller;

import com.dwxt.common.base.BaseResult;
import com.dwxt.parabolic.service.GraphService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/parabolic/graph")
@RestController
public class GraphController {

    @Autowired
    private GraphService graphService;

    /**
     *图表
     * @param companyId
     * @param type 1 year 2 month 3 day
     * @return
     */
    @RequestMapping("/lookup")
    public BaseResult lookup(String companyId, Integer type) throws Exception {
        return graphService.lookup(companyId,type);
    }

}
